from selenium.webdriver.common.by import By

from page.base import Base
from page.login import Login
from appium.webdriver.common.touch_action import TouchAction


class Main(Base):
    def goto_login(self):
        # 按住不松开滑动
        self.action = TouchAction(self.driver)
        action = self.action
        action.press(x=140, y=690) \
            .wait(1000) \
            .move_to(x=589, y=690) \
            .release().perform()

        # 点击操作
        self.click(By.ID,'com.http.user:id/name')
        return Login(self.driver)